﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NFlickr.Communication;
using NFlickr.EncrptProvider;
using NFlickr.RESTServiceProvider;
using NFlickr.Core.Interface;

namespace NFlickr.Factory
{
    public static class FlickrChannelFactory
    {
        public static IChannel CreateInstance()
        {

            IRESTServiceProvider flickrREST = RESTServiceFactory.CreateInstance();
            IEncyptionProvider md5Hash = EncrptFactory.CreateInstance();
            IChannel channel = new HttpChannel { EncrptProvider = md5Hash, RESTServiceProvider = flickrREST, Host = NFlickr.Resource.Url.Host, IsHttps = NFlickr.Resource.Url.IsHttps, Port=NFlickr.Resource.Url.Port};
            return channel;
        }
    }
}
